package com.example.demo.aop;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

/**
 * @Question LoginAOP
 * @Date 2023/1/3 21:55
 * @Solution
 */
@Component
@Aspect
public class LoginAOP {
    @Pointcut("execution(* com.example.demo.controller.UserController.*(..))")
    public void pointcut(){ }

    //前置通知
    @Before("pointcut()")
    public void before() {
        System.out.println("前置通知");
    }
}
